@prefix iop: <https://w3id.org/iadopt/ont/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix ex: <http://example.org/iadopt/challenge/> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .
@prefix uom: <http://www.ontology-of-units-of-measure.org/resource/om-2/> .
@prefix iopp: <https://w3id.org/iadopt/pattern/> .
@prefix patt: <http://example.org/iadopt/pattern> .

ex:FractionFloodedBuilding
    a 
        iop:Variable ;
    rdfs:label 
        "Fraction of flooded area around building" ;
    rdfs:comment 
        """Fraction of flooded area above 30 cm water level within a 5 m buffer around an affected building in an urban area""" ;
    ex:issue "https://github.com/mabablue/I-ADOPT-examples-playground/issues/90" ;
    iop:hasObjectOfInterest 
        _:b0 ;
    iop:hasMatrix
        <https://www.wikidata.org/entity/Q702492> ;
    iop:hasProperty 
        uom:AreaFraction ;
    iop:hasConstraint 
        [ a iop:Constraint ;
             rdfs:label "condition: flooded > 30 cm above ground" ;
             iop:constrains _:b1 ;
        ] ,
        [ a iop:Constraint ;
             rdfs:label "spatial extent: 5 m buffer around buildings" ;
             iop:constrains _:b0 ;
        ] .

_:b0
    a 
        iop:Entity ,
        iop:AsymmetricSystem ;
    iop:hasDenominator 
        _:b2 ;
    iop:hasNumerator 
        _:b1 .

uom:AreaFraction
    a 
        iop:Property ;
    rdfs:label 
        "area fraction" .

<https://www.wikidata.org/entity/Q702492>
    a 
        iop:Entity ;
    rdfs:label 
        "urban area" .

_:b2
    a 
        iop:Entity ;
    rdfs:label 
        "total area" .

_:b1
    a 
        iop:Entity ;
    rdfs:label 
        "flooded area" .
